<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.signin {
	color: #960;
}
.Firstname {
	color: #960;
}
.Email {
	color: #960;
	font-weight: bold;
}
.Password {
	color: #960;
}
Email {
	color: #960;
}
</style>
</head>
<html>
<body>
<form action='signup.php' method='post'> 
   <legend>
   
      <center> <h1 class="signin">Signin</h1><center>
     
   </legend>
   
   <div>
    <img src="http://pirun.kps.ku.ac.th/~b5127172/logoweb/image_%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%8C%E0%B8%95%E0%B8%B9%E0%B8%99%E0%B9%80%E0%B8%84%E0%B8%A5%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%99%E0%B9%84%E0%B8%AB%E0%B8%A7_47502_1.gif" width="240" height="150"/>
    <br/> <br/> <br/>      
  </div>
   
  <strong class="Firstname">Firstname</strong>
  <input name="Firstname" type="text" /> <br /><br />    
  <span class="Email">Email</span><strong>&nbsp; &nbsp; &nbsp;   </strong>
  <input name="email" type="text" /> <br /><br />
  <strong class="Password">Password</strong>
  <input name="ps" type="text" /> <br /><br />
     
<input name="sub" type="submit" value="signin"/>
  </form>  
<?
function signup()
{
//1 เชื่อต่อดาต้าเบส 
$conn=odbc_connect('SourceDb','','');
//2 สร้างคำสั่ง sql 
 $sql="INSERT INTO signup (FirstName, email,password) 
 VALUES ('$_POST[Firstname]','$_POST[email]' ,'$_POST[ps]');";
//3 ทำการรันคำสั่ง sql
 $rs=odbc_exec($conn,$sql);
 
}

 if (!is_null($_POST["email"] ))
{
	echo 'AAAAA' . $_POST["ps"];
signup();
}


?>

<p><br />
</p>
</body>
</html>



















